// GLGraphicsView.h
//
#ifndef GLGRAPHICSVIEW_ONCE
#define GLGRAPHICSVIEW_ONCE

#include "Framework_Exports.h"

#include <QGraphicsView>

class QResizeEvent;
class QGLWidget;
class QGraphicsScene;
class QLayout;

namespace QtFwk{

class FWK_API GLGraphicsView : public QGraphicsView
{
	//Q_OBJECT

private:
protected:
	void resizeEvent		( QResizeEvent *e );
	void leaveEvent			( QEvent *e);
	void enterEvent			( QEvent *e);

	static QGLWidget *sharedGLWidget;
public:
	static QGLWidget *getSharedGLWidget();
	//template <typename SceneType>
	//static void embedScene( QWidget *parent, QLayout *layout, bool shareGLContext );

	GLGraphicsView( QWidget *parent, bool sharingContext  );
	virtual ~GLGraphicsView() {}

	void makeCurrent();

};

}


#endif